<!DOCTYPE html>
<html>
<head>
    <title>banner管理</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <link href="/static/common/css/bootstrap.min.css" rel="stylesheet" media="screen">
    <link href="/static/common/css/bootstrap-theme.min.css" rel="stylesheet" media="screen">
    <link href="/static/common/css/bootstrap-admin-theme.css" rel="stylesheet" media="screen">
    <link href="/static/common/css/DT_bootstrap.css" rel="stylesheet" media="screen">
    #parse("./layout/common.html")
    <!--[if lt IE 9]>
    <script type="text/javascript" src="/static/common/js/html5shiv.js"></script>
    <script type="text/javascript" src="/static/common/js/respond.min.js"></script>
    <![endif]-->
</head>
<body class="bootstrap-admin-with-small-navbar">
#parse("./layout/header.html")
<div class="container">
    <div class="row">
        #parse("./layout/menu.html")
        <div class="col-md-10">
            <div class="row">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <div class="text-muted bootstrap-admin-box-title">Banner管理</div>
                    </div>
                    <div class="bootstrap-admin-panel-content">
                        <button class="btn btn-info addBanner" style="margin-bottom: 5px;">新增Banner</button>
                        <button class="btn btn-info pull-right lookBanner" style="margin-bottom: 5px;">浏览Banner</button>
                        <table class="table">
                            <thead>
                            <tr>
                                <th>标题</th>
                                <th>简介</th>
                                <th>图片</th>
                                <th>状态</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            #foreach($!list in $!bannerList)
                            <tr class="">
                                <td>$!list.title</td>
                                <td>$!list.description</td>
                                <td>$!list.url</td>
                                <td class="center">$!velocityUtil.showStatus($!list.status)</td>
                                <td class="center">
                                    #if($!list.status == 1)
                                    <button class="btn btn-warning BannerStatus" data-value="$!list.id" data-index="2">隐藏</button>
                                    #else
                                    <button class="btn btn-primary BannerStatus" data-value="$!list.id" data-index="1">显示</button>
                                    #end
                                    <button class="btn btn-success BannerEdit" data-value="$!list.id">编辑</button>
                                    <button class="btn btn-danger delBanner" data-value="$!list.id">删除</button>
                                </td>
                            </tr>
                            #end
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    #parse("./layout/foot.html")
</div>

<script type="text/javascript" src="/static/common/js/twitter-bootstrap-hover-dropdown.min.js"></script>
<script type="text/javascript" src="/static/common/vendors/datatables/js/jquery.dataTables.js"></script>
<script type="text/javascript" src="/static/common/js/DT_bootstrap.js"></script>
<script type="text/javascript" src="/static/js/banner.js"></script>
</body>
</html>
